Skip to content

chore: Tron deployments#1384

Merged
tbwebb22 merged 27 commits intomasterfrom
taylor/sp1-usp-tron-deployments
Apr 6, 2026
Merged

chore: Tron deployments#1384
tbwebb22 merged 27 commits intomasterfrom
taylor/sp1-usp-tron-deployments

Conversation

@tbwebb22
Copy link
Copy Markdown
Contributor

@tbwebb22 tbwebb22 commented Mar 25, 2026

Adds scripts for deploying counterfactuals, UniversalSpokePool, SP1Helios, and SP1HeliosAutoVerifier contracts, and deploys these contracts to Tron. Includes changes from the audit branch.

@tbwebb22 tbwebb22 marked this pull request as ready for review March 30, 2026 19:48
@tbwebb22 tbwebb22 requested review from fusmanii and grasphoper March 30, 2026 19:48
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7dc3e6c66e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// and must be in a separate file from counterfactual contracts (OZ v4) to avoid name collisions.
import "../sp1-helios/SP1Helios.sol";
import "../sp1-helios/SP1AutoVerifier.sol";
import "../Universal_SpokePool.sol";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fix Universal_SpokePool import path in Tron entrypoint

TronImports.sol imports ../Universal_SpokePool.sol, but this repository only contains contracts/spoke-pools/Universal_SpokePool.sol. Because profile.tron compiles contracts/tron as its source root, this bad relative path makes the Tron build fail before any deployment script can run. Point the import at the actual file location so FOUNDRY_PROFILE=tron forge build can resolve the contract graph.

Useful? React with 👍 / 👎.

import { deployContract, resolveChainId } from "../deploy";

async function main(): Promise<void> {
const chainId = resolveChainId();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restrict SP1AutoVerifier deployments off mainnet by default

SP1AutoVerifier is a no-op verifier that accepts any proof, but this script resolves chain ID with mainnet as the default when --testnet is omitted. That creates a high-risk footgun where a routine run can deploy an insecure verifier to Tron mainnet and later be wired into SP1Helios, effectively disabling proof validation. Require an explicit opt-in for mainnet (or hard-block it) to prevent accidental insecure production deployments.

Useful? React with 👍 / 👎.

@socket-security
Copy link
Copy Markdown

socket-security bot commented Mar 30, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​across-protocol/​constants@​3.1.100 ⏵ 3.1.10781 +110090 +1699 +270
Addednpm/​tronweb@​6.2.29510010092100

View full report

bmzig
bmzig previously approved these changes Apr 3, 2026
Co-authored-by: bmzig <57361391+bmzig@users.noreply.github.com>
bmzig
bmzig previously approved these changes Apr 6, 2026
Copy link
Copy Markdown
Contributor

@fusmanii fusmanii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployments look good, just couple comments about updating constants to fetch latest tron chain info

}
},
"728126428": {
"chain_name": "Chain 728126428",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name comes from the https://github.com/across-protocol/constants, looks like Tron has been added there so we just need to bump constants version to latest here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated here: 278bd5d

had to make a minor change to GenerateConstantsJson.ts as the constants repo was recently updated to ts6


| Contract Name | Address |
| -------------------------------- | ---------------------------------- |
| CounterfactualDeposit | TUE4j3wvnJf5Qwo9ZdYS9XebFzbMMvisEy |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same with this, once you bump the version, it should also pull the explorer link


const proxyArtifactPath = path.resolve(__dirname, "../../../out-tron/ERC1967Proxy.sol/ERC1967Proxy.json");

const proxyResult = await deployContract({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like this script is deploying the proxy every time. Is there a way to make it only deploy if it can't find an already deployed proxy?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep good call 478d914


const evmChainId = (await ethersProvider.getNetwork()).chainId;
const usdcAddress = TOKEN_SYMBOLS_MAP.USDC.addresses[evmChainId];
const usdcAddress = TOKEN_SYMBOLS_MAP.USDC.addresses[evmChainId as keyof typeof TOKEN_SYMBOLS_MAP.USDC.addresses];
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes needed due to constants repo updating to ts6

@tbwebb22 tbwebb22 merged commit 5225521 into master Apr 6, 2026
12 checks passed
@tbwebb22 tbwebb22 deleted the taylor/sp1-usp-tron-deployments branch April 6, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants